// AWTGridLayout.h: interface for the AWTGridLayout class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_AWTGRIDLAYOUT_H__DC9C0D2E_40B4_11D2_A3F1_006097A44215__INCLUDED_)
#define AFX_AWTGRIDLAYOUT_H__DC9C0D2E_40B4_11D2_A3F1_006097A44215__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#include "AWTLayout.h"

class AFX_EXT_CLASS AWTGridLayout : public AWTLayout,
											public AWTLayoutManager
{
DECLARE_DYNAMIC(AWTGridLayout)
public:
	AWTGridLayout();
	AWTGridLayout(int rows, int cols);
	AWTGridLayout(int rows, int cols, int hgap, int vgap);
	virtual ~AWTGridLayout();

	int getRows()
		{return m_rows;}
	void setRows(int rows)
		{m_rows = rows;}
	int getColumns()
		{return m_cols;}
	void setColumns(int cols)
		{m_cols = cols;}

	virtual AWTLayoutManager* getLayoutManager()
		{return static_cast<AWTLayoutManager*>(this);}

	void addLayoutComponent(CString* name, AWTComponent* comp) {};
	void addLayoutComponent(AWTComponent* comp, AWTObject* constraints){};
	void removeLayoutComponent(AWTComponent* comp) {};
  CSize preferredLayoutSize(AWTContainer* parent);
  CSize minimumLayoutSize(AWTContainer* parent);
	void layoutContainer(AWTContainer* parent);
	void destroy()
		{delete this;}
	
private:
	void construct(int rows, int cols, int hgap, int vgap)
	{
		m_rows = rows;
		m_cols = cols;
		m_hgap = hgap;
		m_vgap = vgap;
	}

protected:
  int m_hgap;
  int m_vgap;
  int m_rows;
  int m_cols;
};

#endif // !defined(AFX_AWTGRIDLAYOUT_H__DC9C0D2E_40B4_11D2_A3F1_006097A44215__INCLUDED_)
